home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 11.7 KB | 368 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWAcquir.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWACQUIR_H
- #define FWACQUIR_H
-
- #ifndef FWEXCDEF_H
- #include "FWExcDef.h"
- #endif
-
- #ifndef FWAUTODE_H
- #include "FWAutoDe.h"
- #endif
-
- #ifndef _ODTYPES_
- #include "ODTypes.h"
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Forward Class Declarations
- //========================================================================================
-
- class FW_CLASS_ATTR ODWindow;
- class FW_CLASS_ATTR ODFrame;
- class FW_CLASS_ATTR ODPart;
- class FW_CLASS_ATTR ODShape;
- class FW_CLASS_ATTR ODTransform;
- class FW_CLASS_ATTR ODStorageUnit;
- class FW_CLASS_ATTR ODStorageUnitView;
- class FW_CLASS_ATTR ODStorageUnitCursor;
- class FW_CLASS_ATTR ODMenuBar;
-
- //========================================================================================
- // class FW_CAcquiredODWindow
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CAcquiredODWindow FW_AUTO_DESTRUCT_OBJECT
- {
- public:
- FW_CAcquiredODWindow();
- FW_CAcquiredODWindow(const FW_CAcquiredODWindow& other);
- FW_CAcquiredODWindow(ODWindow* odWindow);
- ~FW_CAcquiredODWindow();
-
- FW_CAcquiredODWindow& operator=(const FW_CAcquiredODWindow& other);
- FW_CAcquiredODWindow& operator=(ODWindow* odWindow);
-
- FW_Boolean operator==(const FW_CAcquiredODWindow& other) const
- {return fODWindow == other.fODWindow;}
- FW_Boolean operator!=(const FW_CAcquiredODWindow& other) const
- {return fODWindow != other.fODWindow;}
-
- FW_Boolean operator==(ODWindow* odWindow) const
- {return fODWindow == odWindow;}
- FW_Boolean operator!=(ODWindow* odWindow) const
- {return fODWindow != odWindow;}
-
- operator ODWindow*() const
- {return fODWindow;}
- operator const void*() const
- {return fODWindow;}
- ODWindow* operator->() const
- {return fODWindow;}
-
- private:
- ODWindow* fODWindow;
- };
-
- //========================================================================================
- // class FW_CAcquiredODStorageUnit
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CAcquiredODStorageUnit FW_AUTO_DESTRUCT_OBJECT
- {
- public:
- FW_CAcquiredODStorageUnit();
- FW_CAcquiredODStorageUnit(const FW_CAcquiredODStorageUnit& other);
- FW_CAcquiredODStorageUnit(ODStorageUnit* storageUnit);
- ~FW_CAcquiredODStorageUnit();
-
- FW_CAcquiredODStorageUnit& operator=(const FW_CAcquiredODStorageUnit& other);
- FW_CAcquiredODStorageUnit& operator=(ODStorageUnit* storageUnit);
-
- FW_Boolean operator==(const FW_CAcquiredODStorageUnit& other) const
- {return fODStorageUnit == other.fODStorageUnit;}
- FW_Boolean operator!=(const FW_CAcquiredODStorageUnit& other) const
- {return fODStorageUnit != other.fODStorageUnit;}
-
- FW_Boolean operator==(ODStorageUnit* storageUnit) const
- {return fODStorageUnit == storageUnit;}
- FW_Boolean operator!=(ODStorageUnit* storageUnit) const
- {return fODStorageUnit != storageUnit;}
-
- operator ODStorageUnit*() const
- {return fODStorageUnit;}
- operator const void*() const
- {return fODStorageUnit;}
- ODStorageUnit* operator->() const
- {return fODStorageUnit;}
-
- private:
- ODStorageUnit* fODStorageUnit;
- };
-
- //========================================================================================
- // class FW_CAcquiredODFrame
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CAcquiredODFrame FW_AUTO_DESTRUCT_OBJECT
- {
- public:
- FW_CAcquiredODFrame();
- FW_CAcquiredODFrame(const FW_CAcquiredODFrame& other);
- FW_CAcquiredODFrame(ODFrame* odFrame);
- ~FW_CAcquiredODFrame();
-
- FW_CAcquiredODFrame& operator=(const FW_CAcquiredODFrame& other);
- FW_CAcquiredODFrame& operator=(ODFrame* odFrame);
-
- FW_Boolean operator==(const FW_CAcquiredODFrame& other) const
- {return fODFrame == other.fODFrame;}
- FW_Boolean operator!=(const FW_CAcquiredODFrame& other) const
- {return fODFrame != other.fODFrame;}
-
- FW_Boolean operator==(ODFrame* odFrame) const
- {return fODFrame == odFrame;}
- FW_Boolean operator!=(ODFrame* odFrame) const
- {return fODFrame != odFrame;}
-
- operator ODFrame*() const
- {return fODFrame;}
- operator const void*() const
- {return fODFrame;}
- ODFrame* operator->() const
- {return fODFrame;}
-
- private:
- ODFrame* fODFrame;
- };
-
- //========================================================================================
- // class FW_CAcquiredODPart
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CAcquiredODPart FW_AUTO_DESTRUCT_OBJECT
- {
- public:
- FW_CAcquiredODPart();
- FW_CAcquiredODPart(const FW_CAcquiredODPart& other);
- FW_CAcquiredODPart(ODPart* odPart);
- ~FW_CAcquiredODPart();
-
- FW_CAcquiredODPart& operator=(const FW_CAcquiredODPart& other);
- FW_CAcquiredODPart& operator=(ODPart* odPart);
-
- FW_Boolean operator==(const FW_CAcquiredODPart& other) const
- {return fODPart == other.fODPart;}
- FW_Boolean operator!=(const FW_CAcquiredODPart& other) const
- {return fODPart != other.fODPart;}
-
- FW_Boolean operator==(ODPart* odPart) const
- {return fODPart == odPart;}
- FW_Boolean operator!=(ODPart* odPart) const
- {return fODPart != odPart;}
-
- operator ODPart*() const
- {return fODPart;}
- operator const void*() const
- {return fODPart;}
- ODPart* operator->() const
- {return fODPart;}
-
- private:
- ODPart* fODPart;
- };
-
- //========================================================================================
- // CLASS FW_CAcquiredODShape
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CAcquiredODShape FW_AUTO_DESTRUCT_OBJECT
- {
- public:
- FW_CAcquiredODShape();
- FW_CAcquiredODShape(const FW_CAcquiredODShape& other);
- FW_CAcquiredODShape(ODShape* odShape);
- ~FW_CAcquiredODShape();
-
- FW_CAcquiredODShape& operator=(const FW_CAcquiredODShape& other);
- FW_CAcquiredODShape& operator=(ODShape* odShape);
-
- FW_Boolean operator==(const FW_CAcquiredODShape& other) const
- {return fODShape == other.fODShape;}
- FW_Boolean operator!=(const FW_CAcquiredODShape& other) const
- {return fODShape != other.fODShape;}
-
- FW_Boolean operator==(ODShape* odShape) const
- {return fODShape == odShape;}
- FW_Boolean operator!=(ODShape* odShape) const
- {return fODShape != odShape;}
-
- operator ODShape*() const
- {return fODShape;}
- operator const void*() const
- {return fODShape;}
- ODShape* operator->() const
- {return fODShape;}
-
- private:
- ODShape* fODShape;
- };
-
- //========================================================================================
- // CLASS FW_CAcquiredODTransform
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CAcquiredODTransform FW_AUTO_DESTRUCT_OBJECT
- {
- public:
- FW_CAcquiredODTransform();
- FW_CAcquiredODTransform(const FW_CAcquiredODTransform& other);
- FW_CAcquiredODTransform(ODTransform* odTransform);
- ~FW_CAcquiredODTransform();
-
- FW_CAcquiredODTransform& operator=(const FW_CAcquiredODTransform& other);
- FW_CAcquiredODTransform& operator=(ODTransform* odTransform);
-
- FW_Boolean operator==(const FW_CAcquiredODTransform& other) const
- {return fODTransform == other.fODTransform;}
- FW_Boolean operator!=(const FW_CAcquiredODTransform& other) const
- {return fODTransform != other.fODTransform;}
-
- FW_Boolean operator==(ODTransform* odTransform) const
- {return fODTransform == odTransform;}
- FW_Boolean operator!=(ODTransform* odTransform) const
- {return fODTransform != odTransform;}
-
- operator ODTransform*() const
- {return fODTransform;}
- operator const void*() const
- {return fODTransform;}
- ODTransform* operator->() const
- {return fODTransform;}
-
- private:
- ODTransform* fODTransform;
- };
-
- //========================================================================================
- // CLASS FW_CAcquiredODMenuBar
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CAcquiredODMenuBar FW_AUTO_DESTRUCT_OBJECT
- {
- public:
- FW_CAcquiredODMenuBar();
- FW_CAcquiredODMenuBar(const FW_CAcquiredODMenuBar& other);
- FW_CAcquiredODMenuBar(ODMenuBar* odMenuBar);
- ~FW_CAcquiredODMenuBar();
-
- FW_CAcquiredODMenuBar& operator=(const FW_CAcquiredODMenuBar& other);
- FW_CAcquiredODMenuBar& operator=(ODMenuBar* odMenuBar);
-
- FW_Boolean operator==(const FW_CAcquiredODMenuBar& other) const
- {return fODMenuBar == other.fODMenuBar;}
- FW_Boolean operator!=(const FW_CAcquiredODMenuBar& other) const
- {return fODMenuBar != other.fODMenuBar;}
-
- FW_Boolean operator==(ODMenuBar* odMenuBar) const
- {return fODMenuBar == odMenuBar;}
- FW_Boolean operator!=(ODMenuBar* odMenuBar) const
- {return fODMenuBar != odMenuBar;}
-
- operator ODMenuBar*() const
- {return fODMenuBar;}
- operator const void*() const
- {return fODMenuBar;}
- ODMenuBar* operator->() const
- {return fODMenuBar;}
-
- private:
- ODMenuBar* fODMenuBar;
- };
-
- //========================================================================================
- // class FW_CAcquireODStorageUnitView
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CAcquireODStorageUnitView FW_AUTO_DESTRUCT_OBJECT
- {
- public:
- FW_CAcquireODStorageUnitView(Environment* ev,
- ODStorageUnit* su,
- ODPropertyName propertyName,
- ODPositionCode propertyPosCode,
- ODValueType valueType,
- ODValueIndex valueIndex,
- ODPositionCode valuePosCode); // Focus and create the storageView
- FW_CAcquireODStorageUnitView(Environment* ev, ODStorageUnit* su); // Suppose that already focused
- ~FW_CAcquireODStorageUnitView();
-
- operator ODStorageUnitView*() const
- {return fSUView;}
- ODStorageUnitView* operator->() const
- {return fSUView;}
-
- private:
- ODStorageUnitView* fSUView;
- };
-
- //========================================================================================
- // class FW_CAcquireODPropertyName
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CAcquireODPropertyName FW_AUTO_DESTRUCT_OBJECT
- {
- public:
- FW_CAcquireODPropertyName(Environment* ev, ODStorageUnit* su);
- FW_CAcquireODPropertyName(Environment* ev, ODStorageUnitView* suView);
- FW_CAcquireODPropertyName(Environment* ev, ODStorageUnitCursor* suCursor);
- ~FW_CAcquireODPropertyName();
-
- operator ODPropertyName() const
- {return fPropName;}
-
- private:
- ODPropertyName fPropName;
- };
-
- //========================================================================================
- // FW_CopyAndRelease
- //========================================================================================
-
- //########################################################################################
- // SCpp Hack
- // Work around SCpp 8.0.3 bug - importing overloaded functions doesn't work.
- // Replace overloaded functions with normal functions with different names.
- // Use inline overloaded functions which turn around and call the renamed
- // functions so client code isn't affected.
- //########################################################################################
-
- FW_FUNC_ATTR ODShape* FW_CopyAndRelease_Shape(Environment* ev, ODShape* shapeToCopy);
- FW_FUNC_ATTR ODTransform* FW_CopyAndRelease_Transform(Environment* ev, ODTransform* transformToCopy);
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- inline ODShape* FW_CopyAndRelease (Environment* ev, ODShape* shapeToCopy) {
- return FW_CopyAndRelease_Shape (ev, shapeToCopy);
- }
-
- inline ODTransform* FW_CopyAndRelease (Environment* ev, ODTransform* transformToCopy) {
- return FW_CopyAndRelease_Transform (ev, transformToCopy);
- }
-
- #endif
-